{% extends 'application.html' %}
{% block content %}
<div class="row">
    {% include '_nav.html' %}
    <div class="span6"></div>
</div>
<div class="row"> 
    <div class="span8"> 
        <table class="table">
            <thead>
                <tr>
                    <th class="span1">#</th>
                    <th class="span2">分组名称</th>
                    <th class="span2">类型</th>
                    <th class="span3">操作</th>
                </tr>
            </thead>
            <tbody>
                {% for level in levels %}
                <tr>
                    <td>{{level.id}}</td>
                    <td>{{level.name}}</td>
                    <td>{% if level.type == 1 %}私有类型{% elif level.type == 2 %}公共类型{% endif %}</td>
                    <td>
                        <a class="btn btn-mini" href="/level/{{level.id}}">查看</a>
                        <a class="btn btn-mini" href="/level/{{level.id}}/edit">设置</a>
                        <a class="btn btn-mini" href="/level/{{level.id}}/destory">删除</a>
                    </td>
                </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>
</div>
{% endblock %}
